<!--
        File        : Medium.xsl
        Created     : 12.6.2014
        Author      : Martin Ribarič
        Description : XSLT script for transformation
-->
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

    <xsl:template match="medium">
        <h4>SearchResult: </h4>
        <table border="1">
            <thead>
                <th colspan="1">Label</th>
                <th colspan="1">Type</th>
                <th colspan="0">Films</th>
            </thead>
            <td>
                <xsl:value-of select="@label"/>
            </td>
            <td>
                <xsl:value-of select="@type"/>
            </td>
            <xsl:apply-templates select="movies"/>
        </table>
    </xsl:template>

    <xsl:template match="movies">
        <xsl:for-each select="movie">
            <td>
                <xsl:value-of select="."/>
            </td>
        </xsl:for-each>
    </xsl:template>

</xsl:transform>